import pickle
import base64

def dumps(dict1):
    dumps_bytes = pickle.dumps(dict1)
    base64_dumps_str = base64.b64encode(dumps_bytes)
    return base64_dumps_str.decode()


def loads(str):
    dumps_dict = base64.b64decode(str.encode())
    loads_dump_dict = pickle.loads(dumps_dict)
    return loads_dump_dict